The Technical Backgrounds of the parent applications are incorporated herein by reference. For convenience, portions of the parent applications are also reproduced below.
Computers utilize a wide variety of disks as storage media for user data. Disk technologies currently provide optical disks, magnetic disks, hard disks, floppy disks, and removable disks, and new disk technologies are being actively researched and developed. Indeed, some disks used by computers in the future may be cubical or some other shape rather than flat and circular.
FIG. 1 illustrates a disk 10 attached to a disk drive 12. The disk 10 illustrates physical characteristics of both floppies and hard disks; cubical disks or other disks may appear in different configurations than the one shown here. The disk 10 contains a number of concentric data cylinders such as the cylinder 14. The cylinder 14 contains several data sectors, including sectors 16 and 18. The sectors 16 and 18 are located on an upper side 20 of the disk 10; additional sectors may be located on a lower side 22 of the disk 10. The sides 20, 22 of the disk 10 define a platter 24. A hard disk may contain several platters. The upper side 20 of the disk 10 is accessed by a head 26 mounted on an arm 28 secured to the drive 12. Optical or cubical disks may be accessed by other means, such as photoemitters or photoreceptors.
A given sector on the disk 10 may be identified by specifying a head, a cylinder, and a sector within the cylinder. A triplet specifying the head number, cylinder number, and sector number in this manner is known as a "physical sector address." Alternatively, a given sector may be identified by a logical sector address, which is a single number rather than a triplet of numbers.
Many disks mold the available space into one or more partitions by using a partition table located on the disk. A wide variety of partitions are used, and more partition types will no doubt be defined over time. A partial list of current partitions and their associated file systems is given below; the trademarks listed are the property of their respective owners. This list illustrates the benefit of being able to manipulate a variety of partitions; it does not follow that each and every partition listed should or must be supported in a commercial product or in an embodiment of the invention described and claimed hereafter:
12-bit FAT PA0 16-bit FAT&gt;=32 MB, Ext INT 13 PA0 16-bit FAT, partition&lt;32 MB PA0 16-bit FAT, partition&gt;=32 MB PA0 32-bit FAT PA0 32-bit FAT, Ext INT 13 PA0 Advanced UNIX PA0 AIX (Linux) PA0 AIX Bootable (Linux) PA0 AIX bootable partition PA0 AIX data partition PA0 Amoeba bad block table PA0 Amoeba file system PA0 AST Windows swap file PA0 BSDI file system or secondary swap PA0 BSDI swap partition or secondary file system PA0 Coherent file system PA0 Coherent swap partition PA0 Commodore DOS PA0 Compaq diagnostics PA0 Concurrent CP/M, Concurrent DOS PA0 CP/M PA0 CP/M 86 PA0 CTOS (Convergent Technologies OS) PA0 Cyrnix PA0 Dell partition spanning multiple drives (array) PA0 Disabled NT FAT volume set (Q114841) PA0 Disabled NT IFS volume set (Q114841) (HPFS) PA0 DiskSecure Multi-Boot PA0 DOS 3.3+ second partition PA0 DOS access (Linux) PA0 DR-DOS 6.0 LOGIN.EXE-secured 12-bit FAT partition PA0 DR-DOS 6.0 LOGIN.EXE-secured 16-bit FAT partition PA0 DR-DOS 6.0 LOGIN.EXE-secured Huge partition PA0 Extended partition or Extended volume PA0 Extended partition, Ext INT 13 PA0 EZ-Drive 3.05 PA0 FreeBSD/386 PA0 GNU HURD PA0 GoldenBow VFeature PA0 Hidden 12-bit FAT PA0 Hidden 16-bit FAT&gt;=32 MB, Ext INT 13 PA0 Hidden 16-bit FAT, partition&lt;32 MB PA0 Hidden 16-bit FAT, partition&gt;=32 MB PA0 Hidden 32-bit FAT PA0 Hidden 32-bit FAT, Ext INT 13 PA0 Hidden IFS PA0 Installable file system: HPFS, NTFS PA0 LANstep PA0 Linux native file system (ext2fs/xiafs) PA0 Linux Swap partition PA0 Linux/Minix v1.4b+ PA0 Mach, MtXinu BSD 4.3 on Mach PA0 Microport System V/386 PA0 Minix v1.1-1.4a PA0 Mitac Advanced Disk Manager PA0 Mylex DCE376 EISA SCSI controller, past 1024th cyl PA0 NEC MS-DOS 3.x PA0 NextStep Partition PA0 Novell Netware PA0 Novell Netware (3.11 and 4.1) PA0 Novell Netware 286 PA0 Novell Netware 386 PA0 NT FAT volume set (Q114841) PA0 NT IFS volume set (Q114841) (HPFS) PA0 Old MINIX (Linux) PA0 Ontrack Disk Manager 6.0 (DDO) PA0 Ontrack Disk Manager, read/write PA0 Ontrack Disk Manager, read-only PA0 Ontrack Disk Manager, write-only PA0 OPUS PA0 OS/2 PA0 OS/2 Boot Manager PA0 OS/2 hiding type 04h partition PA0 PC/IX PA0 Personal RISC Boot PA0 Priam EDISK PA0 Prime PA0 QNX PA0 Save to Disk Partition PA0 Secure File System PA0 SpeedStor PA0 SpeedStor 12-bit FAT extended partition PA0 SpeedStor 16-bit FAT extended partition PA0 SpeedStor Dimensions PA0 SpeedStor Storage Dimensions PA0 SplitDrive PA0 Syrinx PA0 UNIX SysV/386, 386/ix PA0 VENIX 80286. PA0 XENIX /usr file system PA0 Xenix bad-block table PA0 XENIX root file system
One partition table composition, denoted herein as the "IBM-compatible" partition table, is found on the disks used in many IBM.RTM. personal computers and IBM-compatible computers (IBM is a registered trademark of International Business Machines Corporation). IBM-compatible partition tables may be used on a wide variety of disks, with a variety of partition and file system types, in a variety of ways.
As shown in FIG. 2, an IBM-compatible partition table 32 includes an Initial Program Loader ("IPL") identifier 34, four primary partition identifiers 36, and a boot identifier 38. As shown in FIG. 3, each partition identifier 36 includes a boot indicator 40 to indicate whether the partition in question is bootable. At most one of the partitions in the set of partitions defined by the partition table 32 is bootable at any given time.
Each partition identifier 36 also includes a starting address 42, which is the physical sector address of the first sector in the partition in question, and an ending address 44, which is the physical sector address of the last sector in the partition. A sector count 46 holds the total number of disk sectors in the partition. A boot sector address 48 holds the logical sector address corresponding to the physical starting address 42.
Some IBM-compatible computer systems allow "logical partitions" as well as the primary partitions just described. All logical partitions are contained within one primary partition; a primary partition which contains logical partitions is also known as an "extended partition."
Each partition identifier 36 also includes a system indicator 50. The system indicator 50 identifies the type of file system contained in the partition, which in turn defines the physical arrangement of data that is stored in the partition on the disk 10 (FIG. 1). Values not recognized by a particular operating system are treated as designating an unknown file system. The file system associated with a specific partition of the disk 10 (FIG. 1) determines the format in which data is stored in the partition, namely, the physical arrangement of user data and of file system structures in the portion of the disk 10 that is delimited by the starting address 42 and the ending address 44 of the partition in question. At any given time, each partition thus contains at most one type of file system.
An operating system manages access, not only to the disk 10, but to other computer resources as well. Resources typically managed by the operating system include one or more disks and disk drives, memory (RAM and/or ROM), microprocessors, processors, and I/O devices such as a keyboard, mouse, screen, printer, tape drive, modem, serial port, parallel port, or network port.
It is sometimes desirable to alter the contents of an IBM-compatible partition table. For instance, a person using a computer may wish to move or copy a partition to a different location on the disk while substantially or exactly preserving the number of disk sectors allocated to the partition.
One conventional approach to modification of an IBM-compatible partition table begins by copying all necessary user and system data off the disk to a temporary storage location such as a tape or another disk. The data copied includes without limitation the contents of files created by the user such as textual documents and spreadsheets, the contents of files required to run applications such as word processors, and system data such as directory information. Some internal file system data such as sector allocation maps does not necessarily need to be copied, but is often copied anyway. The familiar disk utility FDISK is then used to update the IBM-compatible partition table. The newly specified partition is then formatted with the familiar disk utility FORMAT or a similar utility (destroying the data on the disk). Finally, the data is copied back into the new partition on the disk. During this copying process the file system copy utility creates appropriate new file system structures reflecting the current locations of data on the disk.
This approach to partition manipulation has several drawbacks. A temporary storage device with adequate storage capacity may not be readily available or affordable under the circumstances. Even if temporary storage is available, copying large amounts of data from the disk to temporary storage and then back again can take a substantial period of time.
In addition, manipulating IBM-compatible partition tables in this manner is confusing and dangerous for many computer users. The FDISK utility assumes that the user is familiar with the intricacies of IBM-compatible partition tables, physical disk addresses, logical partitions, extended partitions, operating system assumptions regarding partitions, and related matters. Users who are unfamiliar with these technical details may easily and inadvertently destroy data.
Less grievous but nonetheless undesirable situations can also arise if the user miscalculates the correct size or position of the new partitions. For instance, if the partition has been made too small to receive all the data from temporary storage, it becomes necessary to once again modify the partition table with FDISK, to reformat again, and to once again copy all the data from temporary storage into the reformatted partition. Even if everything works as desired the first time, this approach to partition modification can be very time-consuming. With a typical disk holding several hundred megabytes of data the process may require several hours to complete successfully.
Some tools, such as those described in the parent applications, do allow users who are unfamiliar with technical intricacies to manipulate IBM-compatible disk partitions more easily than is possible with FDISK. However, the software architecture implemented by previous tools does not cleanly separate file-system-independent components from file-system-dependent components. As a result, the architecture design makes it difficult to "plug in" modules which support additional file systems or modules which make better use of knowledge about the internal file-system-dependent structure of a partition, such as the file system structures that track bad sectors.
Determining where to draw the line that separates file-system-independent components from file-system-dependent components is not trivial. It is true that relatively few partition manipulations are generally needed; the main ones sought are move, copy, shrink, expand, and cluster resize.
However, these manipulations often involve subtleties that arise from overlapping partitions, file system requirements, bad sectors, error handling, physical disk configurations, data structure limitations, or other factors. In addition, a wide variety of file systems using very different system structures is possible. As a result, there are many places where a line separating file-system-independent components from file-system-dependent components might be drawn, with varying degrees of success. The implications of choosing a particular line of separation may also be hard to determine without extensive insight and experimentation.
Thus, it would be an advancement in the art to provide a system which implements a software architecture that cleanly separates file-system-independent components from file-system-dependent components.
It would be an additional advancement to provide such a system which reflects knowledge of subtle factors that can change the efficiency, correctness, or safety of partition manipulations.
Such a system is disclosed and claimed herein.